﻿<Application x:Class="CommandAggregatorExample.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>

        <RadialGradientBrush x:Key="BeautifulBackground" Center="0.2,0.2" GradientOrigin="0.3,0.3" RadiusX="1.5" RadiusY="0.9">
            <GradientStopCollection>
                <GradientStop Offset="0" Color="WhiteSmoke" />
                <GradientStop Offset="0.7" Color="LightBlue" />
                <GradientStop Offset="0.8" Color="WhiteSmoke" />
                <GradientStop Offset="1.1" Color="LightBlue" />
            </GradientStopCollection>
        </RadialGradientBrush>

        <!--  Marc's beautiful dock panel background  -->
        <Style x:Key="dockPanelStyle" TargetType="DockPanel">
            <Setter Property="Background" Value="{StaticResource BeautifulBackground}" />
        </Style>

        <Style TargetType="MenuItem">
            <Setter Property="BorderBrush" Value="Blue" />
            <Setter Property="Background" Value="{StaticResource BeautifulBackground}" />
            <Setter Property="FontWeight" Value="Bold" />
        </Style>

        <!--  Marc's default button  -->
        <ControlTemplate x:Key="buttonTemplate" TargetType="{x:Type Button}">
            <Grid Margin="1,1,1,1">
                <Border x:Name="outerBorder"
                        BorderBrush="Transparent"
                        BorderThickness="2"
                        CornerRadius="12">
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Offset="0" Color="LightYellow" />
                            <GradientStop Offset="1" Color="Goldenrod" />
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <Border x:Name="innerBorder"
                        CornerRadius="12"
                        RenderTransformOrigin="0.5,0.5">
                    <Border.RenderTransform>
                        <ScaleTransform ScaleX="0.9" ScaleY="0.9" />
                    </Border.RenderTransform>
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Offset="0" Color="White" />
                            <GradientStop Offset="1" Color="Transparent" />
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <TextBlock x:Name="txtBtnBlock"
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center"
                           FontSize="12"
                           FontWeight="Bold">
                    <ContentPresenter Margin="5" ClipToBounds="True" />
                </TextBlock>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="outerBorder" Property="Background" Value="Blue" />
                    <Setter Property="Foreground" Value="White" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter TargetName="outerBorder" Property="Background" Value="Gray" />
                    <Setter TargetName="outerBorder" Property="BorderBrush" Value="DarkGray" />
                    <Setter TargetName="innerBorder" Property="Background" Value="LightGray" />
                    <Setter TargetName="txtBtnBlock" Property="Foreground" Value="DarkGray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

    </Application.Resources>
</Application>
